Xbasic

a5storage_listitems Function

Syntax

C a5Storage_listItems(C connectionString [,C searchPrefix [,* pResult ]])

Arguments

connectionStringCharacter

Storage connection string with ::storage:: as a prefix.

searchPrefixCharacter

Default = "". An optional search prefix. If specified, only items that begin with the search prefix will be returned.

pResultPointer

An optional dot variable that you can pass in that will be populated with information about the object.

Returns

resultCharacter

Returns the list of items. If a search prefix was specified, returns the list of items that begin with the search prefix.

Description

Gets a list of items in a storage container, including listing files stored in Amazon S3 or Azure. You can optionally return objects that start with the specified searchPrefix.

Example

dim storageConn as c = "::storage::AmazonS3"
dim items as c
dim properties as p
items = a5Storage_listItems(storageConn, "productImages/button", properties)

? properties
= hasError = .F.
timeTakenMilliseconds = 144

? line_count(items)
= 4

? items
= productImages/buttonsubtheme1.jpg
productImages/buttonsubtheme2.jpg
productImages/buttonsubthemes.jpg
productImages/buttonsubthemes1.jpg

See Also